<?php
		require("../dbconnect.php");
		require("../function.php");

		$field=$_GET["field"];
		$value=$_GET["value"];
		$showName=$_GET["showName"];
		
		$chk=mysql_query("select count(*) as result from os_member where $field='$value'")or die(mysql_error());
		if(mysql_result($chk,0,"result")==0)
		{
			echo "<font color=green>$showName is available</font>";
		}
		else
		{
			echo "<font color=red>$showName already exist!</font>";
		}
		
?>